﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DynaPrecision.InnerProductSpace
{
	public class InnerProductDefinedNorm<TInput, TOutput, TInnerProduct>
		:INorm<TInput, TOutput>
		where TInnerProduct:IInnerProduct<TInput,TOutput>
	{
		public InnerProductDefinedNorm() { ;}
		public InnerProductDefinedNorm(TInnerProduct innerProduct)
		{
			this.InnerProduct = innerProduct;
		}
		public TInnerProduct InnerProduct { get; set; }



		#region INorm<TInput,TOutput> Members

		public TOutput Norm(TInput input)
		{
			return InnerProduct.InnerProduct(input, input);
		}

		#endregion
	}
}
